#pragma once
#include <d3d10_1.h>
#include "Video.h"
using namespace Reign::Core::MathF32;

namespace Reign
{namespace Video
{namespace D3D10
{
	public ref class ShaderVariable : ShaderVariableI
	{
		#pragma region Properties
		private: char* vertexBytes, *pixelBytes;
		private: int vertexOffset, pixelOffset;

		private: string^ name;
		public: property string^ Name {string^ get();}
		#pragma endregion

		#pragma region Constructors
		public: ShaderVariable(char* vertexBytes, char* pixelBytes, int vertexOffset, int pixelOffset, string^ name);
		#pragma endregion

		#pragma region Methods
		private: void copy(array<float>^ values, int offset, int count);
		private: void copy(array<Vector2>^ values, int offset, int count);
		private: void copy(array<Vector3>^ values, int offset, int count);

		public: virtual void Set(float value);
		public: virtual void Set(float x, float y);
		public: virtual void Set(float x, float y, float z);
		public: virtual void Set(float x, float y, float z, float w);
		public: virtual void Set(Vector2 value);
		public: virtual void Set(Vector3 value);
		public: virtual void Set(Vector4 value);
		public: virtual void Set(Matrix2 value);
		public: virtual void Set(Matrix3 value);
		public: virtual void Set(Matrix4 value);
		public: virtual void Set(array<float>^ values);
		public: virtual void Set(array<Vector2>^ values);
		public: virtual void Set(array<Vector3>^ values);
		public: virtual void Set(array<Vector4>^ values);
		public: virtual void Set(array<Matrix2>^ values);
		public: virtual void Set(array<Matrix3>^ values);
		public: virtual void Set(array<Matrix4>^ values);
		public: virtual void Set(array<float>^ values, int count);
		public: virtual void Set(array<Vector2>^ values, int count);
		public: virtual void Set(array<Vector3>^ values, int count);
		public: virtual void Set(array<Vector4>^ values, int count);
		public: virtual void Set(array<Matrix2>^ values, int count);
		public: virtual void Set(array<Matrix3>^ values, int count);
		public: virtual void Set(array<Matrix4>^ values, int count);
		public: virtual void Set(array<float>^ values, int offset, int count);
		public: virtual void Set(array<Vector2>^ values, int offset, int count);
		public: virtual void Set(array<Vector3>^ values, int offset, int count);
		public: virtual void Set(array<Vector4>^ values, int offset, int count);
		public: virtual void Set(array<Matrix2>^ values, int offset, int count);
		public: virtual void Set(array<Matrix3>^ values, int offset, int count);
		public: virtual void Set(array<Matrix4>^ values, int offset, int count);
		#pragma endregion
	};
}
}
}